package com.plian.system.controller.mt.assigmat;

import com.plian.Tools.base.BaseController;
import com.plian.Tools.pagedata.PageData;
import com.plian.system.model.ListResult;
import com.plian.system.model.ObjResult;
import com.plian.system.service.mt.assigmat.AssigMatService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "api/assigmat")
public class AssigMatController extends BaseController {
    @Autowired
    AssigMatService assigMatService;

    @PostMapping(value = "/list")
    public ListResult list(@RequestBody PageData pd) throws Exception {
        return assigMatService.list(pd);
    }

    @PostMapping(value = "/save")
    public ObjResult save(@RequestBody PageData pd) {
        return assigMatService.save(pd);
    }

    @PostMapping(value = "/edit")
    public ObjResult edit(@RequestBody PageData pd) {
        return assigMatService.edit(pd);
    }

    @PostMapping(value = "/del_ids")
    public ObjResult del_ids(@RequestBody PageData pd) {
        return assigMatService.del_ids(pd);
    }

    @PostMapping(value = "/findbyid")
    public ObjResult findid(@RequestBody PageData pd) {
        return assigMatService.findbyid(pd);
    }

    @PostMapping(value = "/lowerHair")
    public ObjResult lowerHair(@RequestBody PageData pd) {
        return assigMatService.lowerHair(pd);
    }
}
